package com.qushiyun.devops.admin.sync.data.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.PageDTO;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.qushiyun.devops.admin.sync.data.mapper.TriggerJobMapper;
import com.qushiyun.devops.admin.sync.data.po.TriggerJob;
import com.qushiyun.devops.admin.sync.data.service.TriggerJobService;
import com.qushiyun.devops.admin.sync.data.vo.TriggerJobVO;
import com.qushiyun.devops.common.framework.mybatis.page.vo.PageVO;
import org.springframework.stereotype.Service;

/**
 * 同步任务
 *
 * @author zhouzx
 */
@Service
public class TriggerJobServiceImpl extends ServiceImpl<TriggerJobMapper, TriggerJob> implements TriggerJobService {


    /**
     * 分页列表
     */
    @Override
    public PageVO<TriggerJobVO> pageList(PageDTO page, TriggerJob job) {
        IPage<TriggerJobVO> pageRes = baseMapper.pageList(page, job);
        PageVO<TriggerJobVO> result = new PageVO<>();
        result.setTotal(pageRes.getTotal());
        result.setList(pageRes.getRecords());
        return result;
    }


}
